import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import './plugins/element.js'
import './assets/css/global.css'
import './assets/font_grade/iconfont.css'
import './assets/font_8w985uougnu/iconfont.css'
import './assets/font_hx6ci07de14/iconfont.css'
import './assets/font_aar2zyfm4qf/iconfont.css'

Vue.prototype.$http = axios
// axios.defaults.headers.post['Content-type'] = 'application/json'
axios.defaults.baseURL = 'http://121.196.185.217:8444'

Vue.prototype.Bus = new Vue();

Vue.config.productionTip = false

// 自定义一个全局的时间过滤器
Vue.filter('dateFormat', function (originVal) {
  const dt = new Date(originVal)
  const y = dt.getFullYear()
  const m = (dt.getMonth() + 1 + '').padStart(2, '0')
  const d = (dt.getDate() + '').padStart(2, '0')
  const hh = (dt.getHours() + '').padStart(2, '0')
  const mm = (dt.getMinutes() + '').padStart(2, '0')
  const ss = (dt.getSeconds() + '').padStart(2, '0')
  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')  
